<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>管理员登录</title>
</head>
<body>
<div align="center">
    <h2>管理员 - 登录</h2>
    <form action="/login" method="post">
        <p>
            账号：<input type="text" id="account" name="account">
        </p>
        <p>
            密码：<input type="text" id="password" name="password">
        </p>
        <p>
            <input type="submit" value="登录">&emsp;
            <input type="reset" value="重置">
        </p>
        <p style="color: red">${message}</p>
    </form>
</div>
<script src="../../statics/js/jquery-3.6.3.min.js"></script>
<script>
    $("form").submit(function (){
        let account = $("#account").val();
        if (account == ""){
            alert("账号不能为空！");
            return false;
        }

        let password = $("#password").val();
        if (password == ""){
            alert("密码不能为空！")
            return false;
        }
        return true;
    })
</script>
</body>
</html>